(function($) {
	var dev =  'http://box.example.com:3000',
		local = 'http://box.example.com',
		hendl = 'http://blindeshendl.cg.tuwien.ac.at',
		bosh = '/xmpp-httpbind';

	// global servers
	var servers = {
		details: [
			{ url: dev, xmpp: local + bosh, domain: 'psi' },
			{ url: local + '/epic', xmpp: local + bosh, domain: 'psi'},
			{ url: hendl + '/epic', xmpp: hendl + bosh, domain: 'hendl'},
			{ url: hendl + '/epic-dev', xmpp: hendl + bosh, domain: 'hendl'}
		],
		options: {
			choices: [
				{ label: 'dev', value: 0},
				{ label: 'apache', value: 1},
				{ label: 'hendl', value: 2},
				{ label: 'hendl_dev', value: 3}
			]
		},
		model: {
			label: 'Server',
			value: 0
		},
		xmpp: function() {
			return {
				url: servers.details[servers.model.value].xmpp,
				domain: servers.details[servers.model.value].domain
			};
		}
	};
	epic.servers = servers;
	
})(jQuery);
